package org.goyo.main.domain.entity.storage;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.goyo.main.domain.entity.BaseEntryObject;
import org.goyo.main.domain.entity.base.BaseUnitMeasure;
import org.goyo.main.domain.entity.base.Material;
@Entity
public class GroupMaterialEntry  extends BaseEntryObject implements Serializable{

	private static final long serialVersionUID = 1L;
	
	@ManyToOne
	@JoinColumn(name="materialId")
	private Material material;
	/**
	 * 商品名称
	 */
	@Column
	private String materialName;
	/**
	 * 商品规格型号	
	 */
	@Column
	private String materialStandard;
	/**
	 * 计量单位	
	 */
	@ManyToOne
	@JoinColumn(name="jilUnitId")
	private BaseUnitMeasure jilUnit;
	/**
	 * 订货数量	
	 */
	@Column
	private double qty = 0;
	
	/**
	 * 辅助计量单位	
	 */
	@ManyToOne
	@JoinColumn(name="fjilUnitId")
	private BaseUnitMeasure fjilUnit;
	/**
	 * 辅助数量	
	 */
	@Column
	private double fqty = 0;
	public Material getMaterial() {
		return material;
	}
	public void setMaterial(Material material) {
		this.material = material;
	}
	public String getMaterialName() {
		return materialName;
	}
	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}
	public String getMaterialStandard() {
		return materialStandard;
	}
	public void setMaterialStandard(String materialStandard) {
		this.materialStandard = materialStandard;
	}
	public BaseUnitMeasure getJilUnit() {
		return jilUnit;
	}
	public void setJilUnit(BaseUnitMeasure jilUnit) {
	  if(jilUnit != null &&("".equals(jilUnit.getUuid()) || jilUnit.getUuid()==null))
	      this.jilUnit = null;
	    else
	        this.jilUnit = jilUnit;
	}
	public double getQty() {
		return qty;
	}
	public void setQty(double qty) {
		this.qty = qty;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public BaseUnitMeasure getFjilUnit() {
		return fjilUnit;
	}
	public void setFjilUnit(BaseUnitMeasure fjilUnit) {
	  if(fjilUnit != null &&("".equals(fjilUnit.getUuid()) || fjilUnit.getUuid()==null))
        this.fjilUnit = null;
      else
          this.fjilUnit = fjilUnit;
	}
	public double getFqty() {
		return fqty;
	}
	public void setFqty(double fqty) {
		this.fqty = fqty;
	}
	
}
